<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>注册</title>
    <script type="text/javascript" src="//mat1.gtimg.com/www/asset/lib/jquery/jquery/jquery-1.11.1.min.js"></script>
</head>
<body>
<img src="/site/captcha">
<input id="mobile" value="" placeholder="mobile">
<input id="code" value="" placeholder="imageCode">
<input id="btn" type="button" value="test">
<script>
    $('#btn').on('click',function(){
        $.post('/api/user/sms',{'mobile':$('#mobile').val(),'image_code':$('#code').val()},function(data){
            alert(data.code);
        },'json');
    });
</script>
</body>
</html>